package com.huatai.vba.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huatai.vba.dal.dao.VbaDictionaryDAO;
import com.huatai.vba.dal.model.VbaDictionary;
import com.huatai.vba.service.VbaDictionaryService;

@Service
public class VbaDictionaryServiceImpl implements VbaDictionaryService {

	@Autowired
	private VbaDictionaryDAO vbaDictionaryDAO;

	@Override
	public List<VbaDictionary> queryVbaDictionary(VbaDictionary dict) {
		return vbaDictionaryDAO.queryByModel(dict);
	}

	@Override
	public VbaDictionary queryVbaDictionary(String dictId) {
		return vbaDictionaryDAO.queryById(dictId);
	}

	@Override
	public List<VbaDictionary> queryVbaDictionaryByKeyNo(Integer keyNo) {
		VbaDictionary dict = new VbaDictionary();
		dict.setKeyNo(keyNo);
		return queryVbaDictionary(dict);
	}

}
